#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int fac(int i)
{
	int mul = 1;
	if (i == 0)
		return 1;
	else
	{
		for (int j = 1; j <= i; j++)
		{
			mul *= j;
		}
		return mul;
	}
}

int main()
{
	int n = 0;
	scanf("%d", &n);
	double sum = 0;
	for (int i = 0; i <= n; i++)
	{
		double temp = 1.0 / fac(i);
		if (temp<0.000000001)
		{
			break;
		}
		sum += temp;
	}
	printf("%.8lf", sum);
	return 0;
}